import React from 'react';
import { Cascader } from 'antd';

const CascaderIndex = (props, ref) => {
  let {
    value,
    onChange = () => {},
    fieldProps = {},
  } = props;
  const { placeholder = '请选择', options = [] } = fieldProps
  return (
    <Cascader
      placeholder={placeholder}
      value={value}
      {...fieldProps}
      onChange={(e) => {
        onChange(e);
      }}
    />
  );
};

export default React.forwardRef(CascaderIndex);
